package com.arcticcoding.dto;

public class Location {
	
	private double 	lon;
	private double	lat;
	private double 	alt;
	private float	accuracy;
	private float 	speed;
	private String 	provider;	
	
	public Location() {
		//Needed by KryoNet
	}
	
	public Location(double lat, double lon) {
		this.lon = lon;
		this.lat = lat;
	}
	
	/**
	 * Creates a new Location object with the information from the 
	 * given android.Location object.
	 * 
	 * @param location The android.Location object which contains the info.
	 */
	public Location(android.location.Location location) {
		this.lon 		= location.getLongitude();
		this.lat 		= location.getLatitude();
		this.alt 		= location.getAltitude();
		this.accuracy 	= location.getAccuracy();
		this.speed 		= location.getSpeed();
		this.provider 	= location.getProvider();
	}

	public double getLon() {
		return lon;
	}

	public double getLat() {
		return lat;
	}

	public double getAlt() {
		return alt;
	}

	public float getAccuracy() {
		return accuracy;
	}

	public float getSpeed() {
		return speed;
	}

	public String getProvider() {
		return provider;
	}
}
